using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using FetCo.Data;
using ADESSA.Business;
using ADESSA.Entities;
using FetCo.Framework;
using FetCo.Web;

public partial class MySantilia : System.Web.UI.Page
{
    protected long Id
    {
        get
        {
            object o = ViewState["Id"];
            if (o != null)
                return (long)o;
            return long.MinValue;
        }
        set
        {
            ViewState["Id"] = value;
        }
    }
    ADESSA.Entities.Member _Member = new ADESSA.Entities.Member();
    protected void Page_Load(object sender, EventArgs e)
    {

        if (IsPostBack)
            return;
        LoadStatusMember();


    }
    
    #region LoadStatusMember
    private void LoadStatusMember()
    {
        if (Session["MemberId"] != null)
        {
            this.Id = long.Parse(Session["MemberId"].ToString());
            if (this.Id != long.MinValue && this.Id != 0)
            {
                _Member = MemberService.GetMember(this.Id);
                if (_Member != null)
                {

                    if (_Member.GoldMember == true)
                    {
                        MembershipFee _MembershipFee = MembershipFeeService.GetMembershipFee(_Member.MembershipFeeID);
                        if (_MembershipFee != null)
                        {
                            ltrStatus.Text = "Your are a <strong class='lk1 bold' style='font-size:15px;'> Gold Member:</strong> " + _MembershipFee.Title; ;
                        }
                    }
                    else
                    {
                        ltrStatus.Text = "Your are a Free Member now.Upgrade to <a href='#' class='lk1 bold'> Gold Member</a> and get 20 times more inquiries! <a href='#' class='lk1 bold' style='font-size:15px;'>Apply now ! </a>";
                    }




                }
            }
        }
        else
            Response.Redirect("MemberLogin.aspx");
    }

    #endregion
}
